package com.cy.service.factory;

import com.cy.service.RemoteProviderService;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class ProviderFallbackFatory implements FallbackFactory<RemoteProviderService> {
    @Override
    public RemoteProviderService create(Throwable throwable) {
        return (msg)-> {
                return "call excpeiton: msg is"+throwable.getMessage();
        };
    }
}
